/**
 * 
 */
package lib.algo;

/**
 * @author <a href="www.sureinterview.com">SureInterview</a>
 * 
 */
public interface Floodfill<T> {

	/**
	 * flood fill the space starting from (startx, starty) if the color matches
	 * the target.
	 * 
	 * @param space
	 *            the space to fill
	 * @param startx
	 * @param starty
	 *            starting position
	 * @param target
	 *            target color to fill in
	 * @param replace
	 *            replace with this color
	 */
	void fooldfill(T[][] space, int startx, int starty, T target, T replace);
}
